package com.atguigu.day11.Test05;

public class Test05 {
    public static void main(String[] args) {
        User[] users = new User[15];
        for (int i = 0; i < users.length; i++) {
            users[i] = new User();
            users[i].setId(i+1);
        }
        Receptionist r1 = new Receptionist(new V1Filter());
        Receptionist r2 = new Receptionist(new V2Filter());
        Receptionist r3 = new Receptionist(new AFilter());
        for (int i = 0; i < users.length; i++) {
            if (i<5)
            r1.RecrptionistMethod(users[i]);
            else if (i<10)
                r2.RecrptionistMethod(users[i]);
            else
                r3.RecrptionistMethod(users[i]);
        }
        for (int i = 0; i < users.length; i++) {
            System.out.println(users[i].toString());
        }
    }
}
